import { createRouter, createWebHashHistory } from 'vue-router'


const routes = [

  {
    path: '/',
    name: '',
   
    component: () => import('../views/Main.vue'),
    children: [
      {
        path: '/Home',
         alias:'',
        name: 'Home',
        component: () => import('../views/Home.vue')
      },
      {
        path: '/Menu',
        name: 'Menu',
        component: () => import('../views/Menu.vue')
      },
      {
        path: '/Shopbag',
        name: 'Shopbag',
        component: () => import('../views/Shopbag.vue')
      },
      {
        path: '/My',
        name: 'My',
        component: () => import('../views/My.vue')
      },
    ]
  },
  {
    path: '/Login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/Detail',
    name: 'Detail',
    component: () => import('../views/Detail.vue')
  },
  {
    path:"/LoginReg",
    name:"LoginReg",
    component:()=>import("../views/LoginReg.vue")
  },
  {
    path:"/Pay",
    name:"Pay",
    component:()=>import("../views/Pay.vue")
  },
  {
    path:"/Address",
    name:"Address",
    component:()=>import("../views/Address.vue")
  },
  {
    path:"/Account",
    name:"Account",
    component:()=>import("../views/Account.vue")
  },
  {
    path:"/Search",
    name:"Search",
    component:()=>import("../views/Search.vue")
  },
  {
    path:"/MyOrder",
    name:"MyOrder",
    component:()=>import("../views/MyOrder.vue")
  },
  {
    path:"/Like",
    name:"Like",
    component:()=>import("../views/Like.vue")
  },
  {
    path:"/Add",
    name:"Add",
    component:()=>import("../views/Add.vue")
  },
  {
    path:"/Secure",
    name:"Secure",
    component:()=>import("../views/Secure.vue")
  }

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
